package com.qiuling.iot.shiro;

import com.qiuling.iot.utils.RedisUtils;
import org.apache.shiro.cache.Cache;
import org.apache.shiro.cache.CacheException;
import org.apache.shiro.cache.CacheManager;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @Author：zhangqiang
 * @Description：
 * @Date：Created in 1:59 2020/2/10
 * @Modified By：
 */
public class RedisCacheManager implements CacheManager {
    @Autowired
    private RedisUtils redisUtils;

    @Override
    public <K, V> Cache<K, V> getCache(String s) throws CacheException {
        return new RedisCache<>(redisUtils);
    }
}
